<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: /HElib/include/helib/PtrMatrix.h Source File</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_d0c4ae63660968bf6b1c77a1e8aecf95.html">helib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">PtrMatrix.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_ptr_matrix_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* Copyright (C) 2012-2020 IBM Corp.</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This program is Licensed under the Apache License, Version 2.0</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * (the &quot;License&quot;); you may not use this file except in compliance</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * with the License. You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *   http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * limitations under the License. See accompanying LICENSE file.</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#ifndef HELIB_PTRMATRIX_H</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#define HELIB_PTRMATRIX_H</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;initializer_list&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_ptr_vector_8h.html">helib/PtrVector.h</a>&gt;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacehelib.html">helib</a> {</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix.html">   26</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structhelib_1_1_ptr_matrix.html">PtrMatrix</a></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;{</div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix.html#ab20e0c171d50b6935d30e1d234993247">   28</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; <a class="code" href="structhelib_1_1_ptr_matrix.html#ab20e0c171d50b6935d30e1d234993247">operator[]</a>(<span class="keywordtype">long</span>) = 0;             <span class="comment">// returns a row</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix.html#a0f57addbfcc0684f9da601e40cfb9250">   29</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; <a class="code" href="structhelib_1_1_ptr_matrix.html#a0f57addbfcc0684f9da601e40cfb9250">operator[]</a>(<span class="keywordtype">long</span>) <span class="keyword">const</span> = 0; <span class="comment">// returns a row</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix.html#a939ee2ea94472a63d762b00182a46d27">   30</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="structhelib_1_1_ptr_matrix.html#a939ee2ea94472a63d762b00182a46d27">size</a>() <span class="keyword">const</span> = 0;                          <span class="comment">// How many rows</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;  <span class="comment">// FIXME: Make this pure virtual</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#pragma GCC diagnostic push</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#pragma GCC diagnostic ignored &quot;-Wunused-parameter&quot;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix.html#a160927bd73ace7169e70c3a2a60fa7ba">   34</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structhelib_1_1_ptr_matrix.html#a160927bd73ace7169e70c3a2a60fa7ba">resize</a>(<span class="keywordtype">long</span> newSize) <span class="comment">// reset the number of rows</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  {</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keywordflow">throw</span> <a class="code" href="classhelib_1_1_logic_error.html">LogicError</a>(<span class="stringliteral">&quot;Cannot resize generic PtrMatrix&quot;</span>);</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  }</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#pragma GCC diagnostic pop</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix.html#a122c00533d7b6c88c41f551afca57e6b">   39</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="structhelib_1_1_ptr_matrix.html#a122c00533d7b6c88c41f551afca57e6b">~PtrMatrix</a>() {}</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160; </div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;  <span class="comment">// Return a pointer to some non-Null T, if it can find one.</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;  <span class="comment">// This is convenient since T may not have an empty constructor</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix.html#a79552187048172837806c40d989a044a">   43</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">const</span> T* <a class="code" href="structhelib_1_1_ptr_matrix.html#a79552187048172837806c40d989a044a">ptr2nonNull</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">long</span> i = 0; i &lt; <a class="code" href="structhelib_1_1_ptr_matrix.html#a939ee2ea94472a63d762b00182a46d27">size</a>(); i++) {</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;      <span class="keyword">const</span> T* pt = (*this)[i].ptr2nonNull();</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;      <span class="keywordflow">if</span> (pt != <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        <span class="keywordflow">return</span> pt;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    }</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;  }</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;};</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160; </div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="namespacehelib.html#a1d7c647ab302e0d9844b52884e086071">   55</a></span>&#160;<span class="keywordtype">long</span> <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(<span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_matrix.html">PtrMatrix&lt;T&gt;</a>&amp; v)</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;{</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  <span class="keywordflow">return</span> v.<a class="code" href="structhelib_1_1_ptr_matrix.html#a939ee2ea94472a63d762b00182a46d27">size</a>();</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;}</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="namespacehelib.html#a65519409bc5c0f7c328147d8664ce5fb">   60</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#ad61eac49543dd3559b386f94ca7112c9">resize</a>(<a class="code" href="structhelib_1_1_ptr_matrix.html">PtrMatrix&lt;T&gt;</a>&amp; v, <span class="keywordtype">long</span> newSize)</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;{</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;  v.<a class="code" href="structhelib_1_1_ptr_matrix.html#a160927bd73ace7169e70c3a2a60fa7ba">resize</a>(newSize);</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;}</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="namespacehelib.html#a5c0a4656214afc3e52fa83408be3ff6a">   65</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#ae2de6d470f49ed882f0bde7b67f5c456">setLengthZero</a>(<a class="code" href="structhelib_1_1_ptr_matrix.html">PtrMatrix&lt;T&gt;</a>&amp; v)</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;{</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;  v.<a class="code" href="structhelib_1_1_ptr_matrix.html#a160927bd73ace7169e70c3a2a60fa7ba">resize</a>(0);</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;}</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="comment">// implementation of resize function below</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="comment">// This header provides some implementations of these interfaces, but</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="comment">// users can define their own as needed. The ones defined here are:</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="comment">// struct PtrMatrix_Vec;    // NTL::Vec&lt;NTL::Vec&lt;T&gt;&gt;</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="comment">// struct PtrMatrix_vector; // std::vector&lt;std::vector&lt;T&gt;&gt;</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="comment">// struct PtrMatrix_ptVec;    // NTL::Vec&lt;NTL::Vec&lt;T&gt;*&gt;</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="comment">// struct PtrMatrix_ptvector; // std::vector&lt;std::vector&lt;T&gt;*&gt;</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160; </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="namespacehelib.html#ab33a07f0cc97da66e279f71195515763">   80</a></span>&#160;<span class="keyword">const</span> T* <a class="code" href="namespacehelib.html#ab33a07f0cc97da66e279f71195515763">ptr2nonNull</a>(std::initializer_list&lt;<span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>*&gt; list)</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;{</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">auto</span> elem : list) {</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keyword">const</span> T* ptr = elem-&gt;ptr2nonNull();</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="keywordflow">if</span> (ptr != <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;      <span class="keywordflow">return</span> ptr;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  }</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;}</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160; </div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="comment">/*******************************************************************/</span></div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="comment">/* Implementation details: applications should not care about them */</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="comment">/*******************************************************************/</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix___vec.html">   96</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structhelib_1_1_ptr_matrix___vec.html">PtrMatrix_Vec</a> : <a class="code" href="structhelib_1_1_ptr_matrix.html">PtrMatrix</a>&lt;T&gt;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;{</div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix___vec.html#a2acba1fd85b4d4d4230752fe7824d5b7">   98</a></span>&#160;  NTL::Vec&lt;NTL::Vec&lt;T&gt;&gt;&amp; <a class="code" href="structhelib_1_1_ptr_matrix___vec.html#a2acba1fd85b4d4d4230752fe7824d5b7">buffer</a>;</div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix___vec.html#ae8283568493fce270cdd0d24fc223c2f">   99</a></span>&#160;  std::vector&lt;PtrVector_VecT&lt;T&gt;&gt; <a class="code" href="structhelib_1_1_ptr_matrix___vec.html#ae8283568493fce270cdd0d24fc223c2f">rows</a>;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;  <span class="comment">// rows[i] is a PtrVector_VecT&lt;T&gt; object &#39;pointing&#39; to buffer[i]</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  <span class="comment">// the above uses std::vector to be able to use emplace</span></div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160; </div>
<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix___vec.html#a155fccc2d4fb372c16092f7ea1f21a7c">  103</a></span>&#160;  <a class="code" href="structhelib_1_1_ptr_matrix___vec.html#a155fccc2d4fb372c16092f7ea1f21a7c">PtrMatrix_Vec</a>(NTL::Vec&lt;NTL::Vec&lt;T&gt;&gt;&amp; mat) : <a class="code" href="structhelib_1_1_ptr_matrix___vec.html#a2acba1fd85b4d4d4230752fe7824d5b7">buffer</a>(mat)</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;  {</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <a class="code" href="structhelib_1_1_ptr_matrix___vec.html#ae8283568493fce270cdd0d24fc223c2f">rows</a>.reserve(<a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(mat));            <span class="comment">// allocate memory</span></div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(mat); i++) <span class="comment">// initialize</span></div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;      <a class="code" href="structhelib_1_1_ptr_matrix___vec.html#ae8283568493fce270cdd0d24fc223c2f">rows</a>.emplace_back(<a class="code" href="structhelib_1_1_ptr_matrix___vec.html#a2acba1fd85b4d4d4230752fe7824d5b7">buffer</a>[i]);</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;  }</div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix___vec.html#a7b62c453f2e61c9f51de9bd9d7a4836b">  109</a></span>&#160;  <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; <a class="code" href="structhelib_1_1_ptr_matrix___vec.html#a7b62c453f2e61c9f51de9bd9d7a4836b">operator[]</a>(<span class="keywordtype">long</span> i) <span class="keyword">override</span> <span class="comment">// returns a row</span></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;  {</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhelib_1_1_ptr_matrix___vec.html#ae8283568493fce270cdd0d24fc223c2f">rows</a>[i];</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  }</div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix___vec.html#ace5de39e1936342e0fc5350ebdedca80">  113</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; <a class="code" href="structhelib_1_1_ptr_matrix___vec.html#ace5de39e1936342e0fc5350ebdedca80">operator[]</a>(<span class="keywordtype">long</span> i) <span class="keyword">const</span> <span class="keyword">override</span> <span class="comment">// returns a row</span></div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;  {</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhelib_1_1_ptr_matrix___vec.html#ae8283568493fce270cdd0d24fc223c2f">rows</a>[i];</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;  }</div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix___vec.html#a455f53bf0d1af3f3dd04569eb67401b0">  117</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="structhelib_1_1_ptr_matrix___vec.html#a455f53bf0d1af3f3dd04569eb67401b0">size</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(<a class="code" href="structhelib_1_1_ptr_matrix___vec.html#ae8283568493fce270cdd0d24fc223c2f">rows</a>); } <span class="comment">// How many rows</span></div>
<div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix___vec.html#ad51a1b74aa22e9f25b6f87159b4c1587">  118</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="structhelib_1_1_ptr_matrix___vec.html#ad51a1b74aa22e9f25b6f87159b4c1587">resize</a>(<span class="keywordtype">long</span> newSize) <span class="keyword">override</span>                 <span class="comment">// reset the number of rows</span></div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;  {</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keywordtype">long</span> oldSize = <a class="code" href="structhelib_1_1_ptr_matrix___vec.html#a455f53bf0d1af3f3dd04569eb67401b0">size</a>();</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    <span class="keywordflow">if</span> (oldSize == newSize)</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;      <span class="keywordflow">return</span>; <span class="comment">// nothing to do</span></div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160; </div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <a class="code" href="structhelib_1_1_ptr_matrix___vec.html#a2acba1fd85b4d4d4230752fe7824d5b7">buffer</a>.SetLength(newSize); <span class="comment">// resize buffer, then add/delete &#39;pointers&#39;</span></div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <span class="keywordflow">if</span> (newSize &gt; oldSize) {</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;      <a class="code" href="structhelib_1_1_ptr_matrix___vec.html#ae8283568493fce270cdd0d24fc223c2f">rows</a>.reserve(newSize);</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = oldSize; i &lt; newSize; i++)</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        <a class="code" href="structhelib_1_1_ptr_matrix___vec.html#ae8283568493fce270cdd0d24fc223c2f">rows</a>.emplace_back(<a class="code" href="structhelib_1_1_ptr_matrix___vec.html#a2acba1fd85b4d4d4230752fe7824d5b7">buffer</a>[i]);</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    }</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    <span class="comment">//    else rows.resize(newSize);</span></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <span class="comment">// Can&#39;t shrink without operator=</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;      std::cerr &lt;&lt; <span class="stringliteral">&quot;Attempt to shrink PtrMatrix_Vec failed\n&quot;</span>;</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    }</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;  }</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;};</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160; </div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__pt_vec.html">  140</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structhelib_1_1_ptr_matrix__pt_vec.html">PtrMatrix_ptVec</a> : <a class="code" href="structhelib_1_1_ptr_matrix.html">PtrMatrix</a>&lt;T&gt;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;{</div>
<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__pt_vec.html#accf3266049e4b39bbc19d640179f8b31">  142</a></span>&#160;  NTL::Vec&lt;NTL::Vec&lt;T&gt;*&gt;&amp; <a class="code" href="structhelib_1_1_ptr_matrix__pt_vec.html#accf3266049e4b39bbc19d640179f8b31">buffer</a>;</div>
<div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__pt_vec.html#a7c25baf46842b013e5f50032bf588fcb">  143</a></span>&#160;  std::vector&lt;PtrVector_VecT&lt;T&gt;&gt; <a class="code" href="structhelib_1_1_ptr_matrix__pt_vec.html#a7c25baf46842b013e5f50032bf588fcb">rows</a>;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;  <span class="comment">// rows[i] is a PtrVector_VecT&lt;T&gt; object &#39;pointing&#39; to *buffer[i]</span></div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;  <span class="comment">// the above uses std::vector to be able to use emplace</span></div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160; </div>
<div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__pt_vec.html#ac30dd962c6463284abc12f22bd14e68e">  147</a></span>&#160;  <a class="code" href="structhelib_1_1_ptr_matrix__pt_vec.html#ac30dd962c6463284abc12f22bd14e68e">PtrMatrix_ptVec</a>(NTL::Vec&lt;NTL::Vec&lt;T&gt;*&gt;&amp; mat) : <a class="code" href="structhelib_1_1_ptr_matrix__pt_vec.html#accf3266049e4b39bbc19d640179f8b31">buffer</a>(mat)</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;  {</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <a class="code" href="structhelib_1_1_ptr_matrix__pt_vec.html#a7c25baf46842b013e5f50032bf588fcb">rows</a>.reserve(<a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(mat));            <span class="comment">// allocate memory</span></div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(mat); i++) <span class="comment">// initialize</span></div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;      <a class="code" href="structhelib_1_1_ptr_matrix__pt_vec.html#a7c25baf46842b013e5f50032bf588fcb">rows</a>.emplace_back(*(<a class="code" href="structhelib_1_1_ptr_matrix__pt_vec.html#accf3266049e4b39bbc19d640179f8b31">buffer</a>[i]));</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;  }</div>
<div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__pt_vec.html#a4d391aacd4951e98efc939a72ae78901">  153</a></span>&#160;  <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; <a class="code" href="structhelib_1_1_ptr_matrix__pt_vec.html#a4d391aacd4951e98efc939a72ae78901">operator[]</a>(<span class="keywordtype">long</span> i) <span class="keyword">override</span> <span class="comment">// returns a row</span></div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;  {</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhelib_1_1_ptr_matrix__pt_vec.html#a7c25baf46842b013e5f50032bf588fcb">rows</a>[i];</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;  }</div>
<div class="line"><a name="l00157"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__pt_vec.html#a03653f77b6435caa76e03f5bb5d041c4">  157</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; <a class="code" href="structhelib_1_1_ptr_matrix__pt_vec.html#a03653f77b6435caa76e03f5bb5d041c4">operator[]</a>(<span class="keywordtype">long</span> i) <span class="keyword">const</span> <span class="keyword">override</span> <span class="comment">// returns a row</span></div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;  {</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhelib_1_1_ptr_matrix__pt_vec.html#a7c25baf46842b013e5f50032bf588fcb">rows</a>[i];</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;  }</div>
<div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__pt_vec.html#a0037fb59a011ce34cfb5868a544cbec2">  161</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="structhelib_1_1_ptr_matrix__pt_vec.html#a0037fb59a011ce34cfb5868a544cbec2">size</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(<a class="code" href="structhelib_1_1_ptr_matrix__pt_vec.html#a7c25baf46842b013e5f50032bf588fcb">rows</a>); } <span class="comment">// How many rows</span></div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;};</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160; </div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__vector.html">  166</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structhelib_1_1_ptr_matrix__vector.html">PtrMatrix_vector</a> : <a class="code" href="structhelib_1_1_ptr_matrix.html">PtrMatrix</a>&lt;T&gt;</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;{</div>
<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__vector.html#a6e252b1001cc898872fad173160dc330">  168</a></span>&#160;  std::vector&lt;std::vector&lt;T&gt;&gt;&amp; <a class="code" href="structhelib_1_1_ptr_matrix__vector.html#a6e252b1001cc898872fad173160dc330">buffer</a>;</div>
<div class="line"><a name="l00169"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__vector.html#a906571b19a7e227fbf8c4641fd32585a">  169</a></span>&#160;  std::vector&lt;PtrVector_vectorT&lt;T&gt;&gt; <a class="code" href="structhelib_1_1_ptr_matrix__vector.html#a906571b19a7e227fbf8c4641fd32585a">rows</a>;</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;  <span class="comment">// rows[i] is a PtrVector_vectorT&lt;T&gt; object &#39;pointing&#39; to buffer[i]</span></div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160; </div>
<div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__vector.html#a5868e8c391111bcdaf5aeb93ddd75a50">  172</a></span>&#160;  <a class="code" href="structhelib_1_1_ptr_matrix__vector.html#a5868e8c391111bcdaf5aeb93ddd75a50">PtrMatrix_vector</a>(std::vector&lt;std::vector&lt;T&gt;&gt;&amp; mat) : <a class="code" href="structhelib_1_1_ptr_matrix__vector.html#a6e252b1001cc898872fad173160dc330">buffer</a>(mat)</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;  {</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <a class="code" href="structhelib_1_1_ptr_matrix__vector.html#a906571b19a7e227fbf8c4641fd32585a">rows</a>.reserve(<a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(mat));            <span class="comment">// allocate memory</span></div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(mat); i++) <span class="comment">// initialize</span></div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;      <a class="code" href="structhelib_1_1_ptr_matrix__vector.html#a906571b19a7e227fbf8c4641fd32585a">rows</a>.emplace_back(<a class="code" href="structhelib_1_1_ptr_matrix__vector.html#a6e252b1001cc898872fad173160dc330">buffer</a>[i]);</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;  }</div>
<div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__vector.html#a5dbeee580bc30a09c3609fa176c63766">  178</a></span>&#160;  <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; <a class="code" href="structhelib_1_1_ptr_matrix__vector.html#a5dbeee580bc30a09c3609fa176c63766">operator[]</a>(<span class="keywordtype">long</span> i) <span class="keyword">override</span> <span class="comment">// returns a row</span></div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;  {</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhelib_1_1_ptr_matrix__vector.html#a906571b19a7e227fbf8c4641fd32585a">rows</a>[i];</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;  }</div>
<div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__vector.html#a2695dda7cbcab816d952a3c42a81a024">  182</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; <a class="code" href="structhelib_1_1_ptr_matrix__vector.html#a2695dda7cbcab816d952a3c42a81a024">operator[]</a>(<span class="keywordtype">long</span> i) <span class="keyword">const</span> <span class="keyword">override</span> <span class="comment">// returns a row</span></div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;  {</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhelib_1_1_ptr_matrix__vector.html#a906571b19a7e227fbf8c4641fd32585a">rows</a>[i];</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;  }</div>
<div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__vector.html#acd4a4d3a7c7d9dd6d5da53151a125464">  186</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="structhelib_1_1_ptr_matrix__vector.html#acd4a4d3a7c7d9dd6d5da53151a125464">size</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(<a class="code" href="structhelib_1_1_ptr_matrix__vector.html#a906571b19a7e227fbf8c4641fd32585a">rows</a>); } <span class="comment">// How many rows</span></div>
<div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__vector.html#a3efbe97c32b705d2a18cf63a75c54816">  187</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="structhelib_1_1_ptr_matrix__vector.html#a3efbe97c32b705d2a18cf63a75c54816">resize</a>(<span class="keywordtype">long</span> newSize) <span class="keyword">override</span>                 <span class="comment">// reset the number of rows</span></div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;  {</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    <span class="keywordtype">long</span> oldSize = <a class="code" href="structhelib_1_1_ptr_matrix__vector.html#acd4a4d3a7c7d9dd6d5da53151a125464">size</a>();</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    <span class="keywordflow">if</span> (oldSize == newSize)</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;      <span class="keywordflow">return</span>; <span class="comment">// nothing to do</span></div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160; </div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    <a class="code" href="structhelib_1_1_ptr_matrix__vector.html#a6e252b1001cc898872fad173160dc330">buffer</a>.resize(newSize); <span class="comment">// resize buffer, then add/delete &#39;pointers&#39;</span></div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <span class="keywordflow">if</span> (newSize &gt; oldSize) {</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;      <a class="code" href="structhelib_1_1_ptr_matrix__vector.html#a906571b19a7e227fbf8c4641fd32585a">rows</a>.reserve(newSize);</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = oldSize; i &lt; newSize; i++)</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        <a class="code" href="structhelib_1_1_ptr_matrix__vector.html#a906571b19a7e227fbf8c4641fd32585a">rows</a>.emplace_back(<a class="code" href="structhelib_1_1_ptr_matrix__vector.html#a6e252b1001cc898872fad173160dc330">buffer</a>[i]);</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    }</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    <span class="comment">//    else rows.resize(newSize);</span></div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    <span class="comment">// Can&#39;t shrink without operator=</span></div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;      std::cerr &lt;&lt; <span class="stringliteral">&quot;Attempt to shrink PtrMatrix_vector failed\n&quot;</span>;</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    }</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;  }</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;};</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160; </div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00209"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__ptvector.html">  209</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structhelib_1_1_ptr_matrix__ptvector.html">PtrMatrix_ptvector</a> : <a class="code" href="structhelib_1_1_ptr_matrix.html">PtrMatrix</a>&lt;T&gt;</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;{</div>
<div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__ptvector.html#a039e0c2185c5ad91dae6f37e480dfd2e">  211</a></span>&#160;  std::vector&lt;std::vector&lt;T&gt;*&gt;&amp; <a class="code" href="structhelib_1_1_ptr_matrix__ptvector.html#a039e0c2185c5ad91dae6f37e480dfd2e">buffer</a>;</div>
<div class="line"><a name="l00212"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__ptvector.html#a68d092efd0c8ca759be905b8bad6786f">  212</a></span>&#160;  std::vector&lt;PtrVector_vectorT&lt;T&gt;&gt; <a class="code" href="structhelib_1_1_ptr_matrix__ptvector.html#a68d092efd0c8ca759be905b8bad6786f">rows</a>;</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;  <span class="comment">// rows[i] is a PtrVector_vectorT&lt;T&gt; object &#39;pointing&#39; to *buffer[i]</span></div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160; </div>
<div class="line"><a name="l00215"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__ptvector.html#a5f4d2479200b62821c8ec142d6ec1252">  215</a></span>&#160;  <a class="code" href="structhelib_1_1_ptr_matrix__ptvector.html#a5f4d2479200b62821c8ec142d6ec1252">PtrMatrix_ptvector</a>(std::vector&lt;std::vector&lt;T&gt;*&gt;&amp; mat) : <a class="code" href="structhelib_1_1_ptr_matrix__ptvector.html#a039e0c2185c5ad91dae6f37e480dfd2e">buffer</a>(mat)</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;  {</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;    <a class="code" href="structhelib_1_1_ptr_matrix__ptvector.html#a68d092efd0c8ca759be905b8bad6786f">rows</a>.reserve(<a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(mat));            <span class="comment">// allocate memory</span></div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(mat); i++) <span class="comment">// initialize</span></div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;      <a class="code" href="structhelib_1_1_ptr_matrix__ptvector.html#a68d092efd0c8ca759be905b8bad6786f">rows</a>.emplace_back(*(<a class="code" href="structhelib_1_1_ptr_matrix__ptvector.html#a039e0c2185c5ad91dae6f37e480dfd2e">buffer</a>[i]));</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;  }</div>
<div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__ptvector.html#aec9c151a794db0f54ef1cb2a5f02e362">  221</a></span>&#160;  <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; <a class="code" href="structhelib_1_1_ptr_matrix__ptvector.html#aec9c151a794db0f54ef1cb2a5f02e362">operator[]</a>(<span class="keywordtype">long</span> i) <span class="keyword">override</span> <span class="comment">// returns a row</span></div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;  {</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhelib_1_1_ptr_matrix__ptvector.html#a68d092efd0c8ca759be905b8bad6786f">rows</a>[i];</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;  }</div>
<div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__ptvector.html#ac0a2f590a067f8ddfdbd7e3c2873cb94">  225</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="structhelib_1_1_ptr_vector.html">PtrVector&lt;T&gt;</a>&amp; <a class="code" href="structhelib_1_1_ptr_matrix__ptvector.html#ac0a2f590a067f8ddfdbd7e3c2873cb94">operator[]</a>(<span class="keywordtype">long</span> i) <span class="keyword">const</span> <span class="keyword">override</span> <span class="comment">// returns a row</span></div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;  {</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhelib_1_1_ptr_matrix__ptvector.html#a68d092efd0c8ca759be905b8bad6786f">rows</a>[i];</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;  }</div>
<div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="structhelib_1_1_ptr_matrix__ptvector.html#a08cd6fdb3183572bf9d7b8238c8f3a41">  229</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="structhelib_1_1_ptr_matrix__ptvector.html#a08cd6fdb3183572bf9d7b8238c8f3a41">size</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(<a class="code" href="structhelib_1_1_ptr_matrix__ptvector.html#a68d092efd0c8ca759be905b8bad6786f">rows</a>); } <span class="comment">// How many rows</span></div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;};</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160; </div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;} <span class="comment">// namespace helib</span></div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160; </div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;<span class="preprocessor">#endif // ifndef HELIB_PTRMATRIX_H</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="anamespacehelib_html_ae8f65ef133cee27ad846423d012d5487"><div class="ttname"><a href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">helib::lsize</a></div><div class="ttdeci">long lsize(const std::vector&lt; T &gt; &amp;v)</div><div class="ttdoc">Size of STL vector as a long (rather than unsigned long)</div><div class="ttdef"><b>Definition:</b> NumbTh.h:652</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix___vec_html_ace5de39e1936342e0fc5350ebdedca80"><div class="ttname"><a href="structhelib_1_1_ptr_matrix___vec.html#ace5de39e1936342e0fc5350ebdedca80">helib::PtrMatrix_Vec::operator[]</a></div><div class="ttdeci">const PtrVector&lt; T &gt; &amp; operator[](long i) const override</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:113</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__pt_vec_html_ac30dd962c6463284abc12f22bd14e68e"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__pt_vec.html#ac30dd962c6463284abc12f22bd14e68e">helib::PtrMatrix_ptVec::PtrMatrix_ptVec</a></div><div class="ttdeci">PtrMatrix_ptVec(NTL::Vec&lt; NTL::Vec&lt; T &gt; * &gt; &amp;mat)</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:147</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix_html_a0f57addbfcc0684f9da601e40cfb9250"><div class="ttname"><a href="structhelib_1_1_ptr_matrix.html#a0f57addbfcc0684f9da601e40cfb9250">helib::PtrMatrix::operator[]</a></div><div class="ttdeci">virtual const PtrVector&lt; T &gt; &amp; operator[](long) const =0</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__vector_html"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__vector.html">helib::PtrMatrix_vector</a></div><div class="ttdoc">An implementation of PtrMatrix using vector&lt; vector&lt;T&gt; &gt;</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:167</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix_html"><div class="ttname"><a href="structhelib_1_1_ptr_matrix.html">helib::PtrMatrix</a></div><div class="ttdoc">An abstract class for an array of PtrVectors.</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:27</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix_html_a122c00533d7b6c88c41f551afca57e6b"><div class="ttname"><a href="structhelib_1_1_ptr_matrix.html#a122c00533d7b6c88c41f551afca57e6b">helib::PtrMatrix::~PtrMatrix</a></div><div class="ttdeci">virtual ~PtrMatrix()</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:39</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__ptvector_html_a08cd6fdb3183572bf9d7b8238c8f3a41"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__ptvector.html#a08cd6fdb3183572bf9d7b8238c8f3a41">helib::PtrMatrix_ptvector::size</a></div><div class="ttdeci">long size() const override</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:229</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__pt_vec_html_accf3266049e4b39bbc19d640179f8b31"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__pt_vec.html#accf3266049e4b39bbc19d640179f8b31">helib::PtrMatrix_ptVec::buffer</a></div><div class="ttdeci">NTL::Vec&lt; NTL::Vec&lt; T &gt; * &gt; &amp; buffer</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:142</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__ptvector_html_a68d092efd0c8ca759be905b8bad6786f"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__ptvector.html#a68d092efd0c8ca759be905b8bad6786f">helib::PtrMatrix_ptvector::rows</a></div><div class="ttdeci">std::vector&lt; PtrVector_vectorT&lt; T &gt; &gt; rows</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:212</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__vector_html_acd4a4d3a7c7d9dd6d5da53151a125464"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__vector.html#acd4a4d3a7c7d9dd6d5da53151a125464">helib::PtrMatrix_vector::size</a></div><div class="ttdeci">long size() const override</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:186</div></div>
<div class="ttc" id="aclasshelib_1_1_logic_error_html"><div class="ttname"><a href="classhelib_1_1_logic_error.html">helib::LogicError</a></div><div class="ttdoc">Inherits from Exception and std::logic_error.</div><div class="ttdef"><b>Definition:</b> exceptions.h:68</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__pt_vec_html_a03653f77b6435caa76e03f5bb5d041c4"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__pt_vec.html#a03653f77b6435caa76e03f5bb5d041c4">helib::PtrMatrix_ptVec::operator[]</a></div><div class="ttdeci">const PtrVector&lt; T &gt; &amp; operator[](long i) const override</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:157</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix___vec_html_a455f53bf0d1af3f3dd04569eb67401b0"><div class="ttname"><a href="structhelib_1_1_ptr_matrix___vec.html#a455f53bf0d1af3f3dd04569eb67401b0">helib::PtrMatrix_Vec::size</a></div><div class="ttdeci">long size() const override</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:117</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix___vec_html_a7b62c453f2e61c9f51de9bd9d7a4836b"><div class="ttname"><a href="structhelib_1_1_ptr_matrix___vec.html#a7b62c453f2e61c9f51de9bd9d7a4836b">helib::PtrMatrix_Vec::operator[]</a></div><div class="ttdeci">PtrVector&lt; T &gt; &amp; operator[](long i) override</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:109</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__pt_vec_html"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__pt_vec.html">helib::PtrMatrix_ptVec</a></div><div class="ttdoc">An implementation of PtrMatrix using Vec&lt; Vec&lt;T&gt;* &gt;</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:141</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__vector_html_a6e252b1001cc898872fad173160dc330"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__vector.html#a6e252b1001cc898872fad173160dc330">helib::PtrMatrix_vector::buffer</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; T &gt; &gt; &amp; buffer</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:168</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__pt_vec_html_a4d391aacd4951e98efc939a72ae78901"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__pt_vec.html#a4d391aacd4951e98efc939a72ae78901">helib::PtrMatrix_ptVec::operator[]</a></div><div class="ttdeci">PtrVector&lt; T &gt; &amp; operator[](long i) override</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:153</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix___vec_html_a2acba1fd85b4d4d4230752fe7824d5b7"><div class="ttname"><a href="structhelib_1_1_ptr_matrix___vec.html#a2acba1fd85b4d4d4230752fe7824d5b7">helib::PtrMatrix_Vec::buffer</a></div><div class="ttdeci">NTL::Vec&lt; NTL::Vec&lt; T &gt; &gt; &amp; buffer</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:98</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__pt_vec_html_a0037fb59a011ce34cfb5868a544cbec2"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__pt_vec.html#a0037fb59a011ce34cfb5868a544cbec2">helib::PtrMatrix_ptVec::size</a></div><div class="ttdeci">long size() const override</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:161</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix___vec_html_ae8283568493fce270cdd0d24fc223c2f"><div class="ttname"><a href="structhelib_1_1_ptr_matrix___vec.html#ae8283568493fce270cdd0d24fc223c2f">helib::PtrMatrix_Vec::rows</a></div><div class="ttdeci">std::vector&lt; PtrVector_VecT&lt; T &gt; &gt; rows</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:99</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix___vec_html"><div class="ttname"><a href="structhelib_1_1_ptr_matrix___vec.html">helib::PtrMatrix_Vec</a></div><div class="ttdoc">An implementation of PtrMatrix using Vec&lt; Vec&lt;T&gt; &gt;</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:97</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__vector_html_a5dbeee580bc30a09c3609fa176c63766"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__vector.html#a5dbeee580bc30a09c3609fa176c63766">helib::PtrMatrix_vector::operator[]</a></div><div class="ttdeci">PtrVector&lt; T &gt; &amp; operator[](long i) override</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:178</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix_html_ab20e0c171d50b6935d30e1d234993247"><div class="ttname"><a href="structhelib_1_1_ptr_matrix.html#ab20e0c171d50b6935d30e1d234993247">helib::PtrMatrix::operator[]</a></div><div class="ttdeci">virtual PtrVector&lt; T &gt; &amp; operator[](long)=0</div></div>
<div class="ttc" id="anamespacehelib_html_ab33a07f0cc97da66e279f71195515763"><div class="ttname"><a href="namespacehelib.html#ab33a07f0cc97da66e279f71195515763">helib::ptr2nonNull</a></div><div class="ttdeci">const T * ptr2nonNull(std::initializer_list&lt; const PtrVector&lt; T &gt; * &gt; list)</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:80</div></div>
<div class="ttc" id="anamespacehelib_html_ae2de6d470f49ed882f0bde7b67f5c456"><div class="ttname"><a href="namespacehelib.html#ae2de6d470f49ed882f0bde7b67f5c456">helib::setLengthZero</a></div><div class="ttdeci">void setLengthZero(std::vector&lt; T &gt; &amp;vec)</div><div class="ttdef"><b>Definition:</b> NumbTh.h:673</div></div>
<div class="ttc" id="anamespacehelib_html_ad61eac49543dd3559b386f94ca7112c9"><div class="ttname"><a href="namespacehelib.html#ad61eac49543dd3559b386f94ca7112c9">helib::resize</a></div><div class="ttdeci">void resize(NTL::Vec&lt; T &gt; &amp;v, long sz, const T &amp;val)</div><div class="ttdef"><b>Definition:</b> NumbTh.h:695</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix_html_a939ee2ea94472a63d762b00182a46d27"><div class="ttname"><a href="structhelib_1_1_ptr_matrix.html#a939ee2ea94472a63d762b00182a46d27">helib::PtrMatrix::size</a></div><div class="ttdeci">virtual long size() const =0</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix_html_a79552187048172837806c40d989a044a"><div class="ttname"><a href="structhelib_1_1_ptr_matrix.html#a79552187048172837806c40d989a044a">helib::PtrMatrix::ptr2nonNull</a></div><div class="ttdeci">virtual const T * ptr2nonNull() const</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:43</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix___vec_html_a155fccc2d4fb372c16092f7ea1f21a7c"><div class="ttname"><a href="structhelib_1_1_ptr_matrix___vec.html#a155fccc2d4fb372c16092f7ea1f21a7c">helib::PtrMatrix_Vec::PtrMatrix_Vec</a></div><div class="ttdeci">PtrMatrix_Vec(NTL::Vec&lt; NTL::Vec&lt; T &gt;&gt; &amp;mat)</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:103</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_vector_html"><div class="ttname"><a href="structhelib_1_1_ptr_vector.html">helib::PtrVector</a></div><div class="ttdoc">Abstract class for an array of objects.</div><div class="ttdef"><b>Definition:</b> PtrVector.h:32</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__ptvector_html_a5f4d2479200b62821c8ec142d6ec1252"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__ptvector.html#a5f4d2479200b62821c8ec142d6ec1252">helib::PtrMatrix_ptvector::PtrMatrix_ptvector</a></div><div class="ttdeci">PtrMatrix_ptvector(std::vector&lt; std::vector&lt; T &gt; * &gt; &amp;mat)</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:215</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__ptvector_html"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__ptvector.html">helib::PtrMatrix_ptvector</a></div><div class="ttdoc">An implementation of PtrMatrix using vector&lt; vector&lt;T&gt;* &gt;</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:210</div></div>
<div class="ttc" id="anamespacehelib_html"><div class="ttname"><a href="namespacehelib.html">helib</a></div><div class="ttdef"><b>Definition:</b> apiAttributes.h:21</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__ptvector_html_a039e0c2185c5ad91dae6f37e480dfd2e"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__ptvector.html#a039e0c2185c5ad91dae6f37e480dfd2e">helib::PtrMatrix_ptvector::buffer</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; T &gt; * &gt; &amp; buffer</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:211</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__vector_html_a3efbe97c32b705d2a18cf63a75c54816"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__vector.html#a3efbe97c32b705d2a18cf63a75c54816">helib::PtrMatrix_vector::resize</a></div><div class="ttdeci">void resize(long newSize) override</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:187</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__vector_html_a2695dda7cbcab816d952a3c42a81a024"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__vector.html#a2695dda7cbcab816d952a3c42a81a024">helib::PtrMatrix_vector::operator[]</a></div><div class="ttdeci">const PtrVector&lt; T &gt; &amp; operator[](long i) const override</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:182</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix___vec_html_ad51a1b74aa22e9f25b6f87159b4c1587"><div class="ttname"><a href="structhelib_1_1_ptr_matrix___vec.html#ad51a1b74aa22e9f25b6f87159b4c1587">helib::PtrMatrix_Vec::resize</a></div><div class="ttdeci">void resize(long newSize) override</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:118</div></div>
<div class="ttc" id="a_ptr_vector_8h_html"><div class="ttname"><a href="_ptr_vector_8h.html">PtrVector.h</a></div><div class="ttdoc">Convenience class templates providing a unified interface for a collection of objects,...</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix_html_a160927bd73ace7169e70c3a2a60fa7ba"><div class="ttname"><a href="structhelib_1_1_ptr_matrix.html#a160927bd73ace7169e70c3a2a60fa7ba">helib::PtrMatrix::resize</a></div><div class="ttdeci">virtual void resize(long newSize)</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:34</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__ptvector_html_aec9c151a794db0f54ef1cb2a5f02e362"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__ptvector.html#aec9c151a794db0f54ef1cb2a5f02e362">helib::PtrMatrix_ptvector::operator[]</a></div><div class="ttdeci">PtrVector&lt; T &gt; &amp; operator[](long i) override</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:221</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__vector_html_a5868e8c391111bcdaf5aeb93ddd75a50"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__vector.html#a5868e8c391111bcdaf5aeb93ddd75a50">helib::PtrMatrix_vector::PtrMatrix_vector</a></div><div class="ttdeci">PtrMatrix_vector(std::vector&lt; std::vector&lt; T &gt;&gt; &amp;mat)</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:172</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__pt_vec_html_a7c25baf46842b013e5f50032bf588fcb"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__pt_vec.html#a7c25baf46842b013e5f50032bf588fcb">helib::PtrMatrix_ptVec::rows</a></div><div class="ttdeci">std::vector&lt; PtrVector_VecT&lt; T &gt; &gt; rows</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:143</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__ptvector_html_ac0a2f590a067f8ddfdbd7e3c2873cb94"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__ptvector.html#ac0a2f590a067f8ddfdbd7e3c2873cb94">helib::PtrMatrix_ptvector::operator[]</a></div><div class="ttdeci">const PtrVector&lt; T &gt; &amp; operator[](long i) const override</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:225</div></div>
<div class="ttc" id="astructhelib_1_1_ptr_matrix__vector_html_a906571b19a7e227fbf8c4641fd32585a"><div class="ttname"><a href="structhelib_1_1_ptr_matrix__vector.html#a906571b19a7e227fbf8c4641fd32585a">helib::PtrMatrix_vector::rows</a></div><div class="ttdeci">std::vector&lt; PtrVector_vectorT&lt; T &gt; &gt; rows</div><div class="ttdef"><b>Definition:</b> PtrMatrix.h:169</div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
